const createNumber = () => {
  let arr = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9];
  let result = [];
  while (result.length < 8) {
    let idx = Math.floor(Math.random() * arr.length);
    result.push(arr[idx]);
    arr.splice(idx, 1);
  }
  let number = result.join("");

  return number;
};

module.exports = createNumber;
